package com.daxia.bumall.model;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * ProductCollect
 */
@Entity
@Table(name = "productcollect") 
public class ProductCollect extends BaseModel {
	
	public ProductCollect() {
	}
	
	public ProductCollect(Long id) {
		this.id = id;
	}
	
	/**
	 * id
	 */
	@Id
	@GeneratedValue
	@Column(name = "id")
    private Long id;
	/**
	 * 用户
	 */
	@ManyToOne
	@JoinColumn(name = "user_id")
    private User user;
	/**
	 * 产品
	 */
	@ManyToOne
	@JoinColumn(name = "product_id")
    private Product product;
	
	public Long getId() {
    	return id;
    }
	
    public void setId(Long id) {
    	this.id = id;
    }
	
	public User getUser() {
    	return user;
    }
	
    public void setUser(User user) {
    	this.user = user;
    }
	
	public Product getProduct() {
    	return product;
    }
	
    public void setProduct(Product product) {
    	this.product = product;
    }
	
}
